<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
    <head>
            <meta charset="utf-8">
            <title>我的记录</title>
            <meta http-equiv="Content-type" content="text/html; charset=utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta http-equiv="Cache-Control" content="no-transform" />
            <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
            <meta name="apple-mobile-web-app-status-bar-style" content="black">
            <meta name="renderer" content="webkit">
            <!--uc浏览器判断到页面上文字居多时，会自动放大字体优化移动用户体验。添加以下头部可以禁用掉该优化-->
            <meta name="wap-font-scale" content="no">
            <meta content="telephone=no" name="format-detection"/>
            <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
            <link rel="stylesheet" type="text/css" href="/majiang/Public/home/css/mian.css"/>
            <script type="text/javascript" src="/majiang/Public/home/js/jquery-1.10.2.min.js"></script>
            <script src="/majiang/Public/home/js/html5.js" type="text/javascript" charset="utf-8"></script>
            <script>
            	 (function (doc, win) {
					var docEl = doc.documentElement,
					resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',         
					recalc = function () {
					  var clientWidth = docEl.clientWidth;
					  <!--
					  /*自加*/
					  clientWidth = document.documentElement ? document.documentElement.clientWidth : document.body.clientWidth;
					  if (clientWidth > 720) clientWidth = 720;
					  /*自加*/
					  -->
					  if (!clientWidth) return;
					  docEl.style.fontSize = 20 * (clientWidth / 720) + 'px';
					};
					  if (!doc.addEventListener) return;
					  win.addEventListener(resizeEvt, recalc, false);
					  doc.addEventListener('DOMContentLoaded', recalc, false);
				})(document, window);
            </script>
			<style>
			.btn00{line-height:2rem;width:90%;margin: 1rem auto;border: none;background:#FF3C00;color: #FFFFFF;font-size:0.75rem;display: block;}
			</style>
    </head>
    
    <body>
    	<div class="box">
			<header class="head">
            	<a href="<?php echo U('index/index');?>"></a>
                <h4>我的记录</h4>
            </header>
            <div class="wdjl_box" style="padding-top: 0rem;">
            	<div class="wdjl_nav c">
                	<span onclick="location.href='<?php echo U('index/tixianlist');?>'" style="cursor:pointer;">提现记录</span>
                    <span class="link" style="cursor:pointer;">充值记录</span>
                    <span onclick="location.href='<?php echo U('index/yongjinlist');?>'" style="cursor:pointer;">佣金记录</span>
                </div>
                <div class="wdjl_ct_box">
					<div class="wdjl_ct">
						<?php if(is_array($PayinfoList)): $i = 0; $__LIST__ = $PayinfoList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$payinfo): $mod = ($i % 2 );++$i;?><ul>
                        	<li>
								<span>
                                	<h4><?php echo ($payinfo["payflag"]); ?></h4>
                                    <p><?php echo (date("Y-m-d H:i:s",$payinfo["addtime"])); ?></p>
                                </span>
                                <strong>
                                	<h4><?php echo ($payinfo["money"]); ?>元</h4>
                                    <p><?php echo ($payinfo["remarks"]); ?></p>
                                </strong>
                            </li>
                        </ul><?php endforeach; endif; else: echo "" ;endif; ?>
                    </div>
					<button onclick="getmore()" id="morebtn" data='1' class="btn00">更多</button>
                </div>
            </div>
        </div>
    </body>
</html>

<script>
	$('.wdjl_ct_box .wdjl_ct').eq(0).show();

	function getmore(){
			var page=parseInt($('#morebtn').attr("data"))+1;
		
			$.getJSON("<?php echo U('index/chongzhilist');?>&p="+page,function(result){
				//console.log(result.listinfo);
				$('#morebtn').attr("data",page);//重置当前页数
				var data=result.PayinfoList;
				if(data.length>0){
					var html="";
					for(var i=0;i<data.length;i++){
						html+='<ul>';
                        html+='		<li>';
                        html+='    		<span>';
                        html+='        		<h4>'+data[i].payflag+'</h4>';
                        html+='				<p>'+data[i].addtime+'</p>';
                        html+='			</span>';
                        html+='			<strong>';
                        html+='				<h4>'+data[i].money+'元</h4>';
						html+='				<p>'+data[i].remarks+'</p>';
                        html+='			</strong>';
                        html+='    </li>';
                        html+='</ul>';
					}
					$(".wdjl_ct").append(html);
				}else{
					$("#morebtn").html('亲，没有数据了！');
				}
			});
		}
</script>